﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section scripts
{
    <script src="~/Content/js/core/viewModel.edit.js" type="text/javascript"></script>
    @RenderSection("scripts", false)
    <script type="text/javascript">
        $(document).ready(function () {
        });
        
        if(!viewModel){
        var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
        var viewModel = com.viewModel.edit;
        ko.bindingViewModel(new viewModel(data));
        }
    </script>
}
<div id="toolbar" style="border: 1px solid #ddd">
    <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-save'"
        data-bind="click:save">Save</a> <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-close'"
            data-bind="click:close">Close</a>
</div>
@RenderBody()
